CLASS ymoon_cl_wo_check_before_check DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.

    INTERFACES if_badi_interface .
    INTERFACES if_mfgorder_check_before_save .
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS YMOON_CL_WO_CHECK_BEFORE_CHECK IMPLEMENTATION.


  METHOD if_mfgorder_check_before_save~check_before_save.

    DATA:lv_aufnr TYPE c LENGTH 12.
    DATA:ls_tb TYPE ymoon_t031.


    ls_tb-aufnr = manufacturingorder-manufacturingorder .
    GET TIME STAMP FIELD ls_tb-timestp.




*    DATA lo_operation       TYPE REF TO if_bgmc_op_single.
*    DATA lo_process         TYPE REF TO if_bgmc_process_single_op.
*    DATA lx_bgmc            TYPE REF TO cx_bgmc.
*
*    lo_operation = NEW ymoon_cl_bgpf_sample( ls_tb-aufnr ).
*    TRY.
*        lo_process = cl_bgmc_process_factory=>get_default( )->create( ).
*        lo_process->set_name( 'MOON TEST PROCESS' )->set_operation( lo_operation ).
**        lo_process->save_for_execution( ).
**        COMMIT WORK.
*      CATCH cx_bgmc INTO lx_bgmc.
*    ENDTRY.

  ENDMETHOD.
ENDCLASS.
